package com.example.gw_back_end.domain.entities;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.time.LocalDateTime;

@Data
@TableName(value = "tb_post")
public class Post {

  @TableId(value = "id",type = IdType.AUTO)
  private Integer id;
  private Integer userId;
  private String title;
  private String content;
  private LocalDateTime createTime;
  private LocalDateTime updateTime;
  private Integer status;

  @TableField(exist = false)
  private String username;
  @TableField(exist = false)
  private String avatar;
  @TableField(exist = false)
  private Integer likeCount;
  @TableField(exist = false)
  private Integer commentCount;
  @TableField(exist = false)
  private Integer viewCount;

}
